perm filename LRNMU1.DGL[UP,DOC]3 blob sn#212028 filedate 1977-02-27 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00010 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	ABSTRACT 				
C00005 00003	2-1   INPUT FOR MUSIC PROGRAMS:			PAGE 4-1
C00029 00004	MUSIC COMPILER, WORD CONVERSION, AND D/A PROGRAMS:   PAGE 5-1
C00037 00005	ANALOG ASPECTS					PAGE 6
C00042 00006	MISC. FILES AND PROGRAMS 			PAGE 7-1
C00049 00007	MIXER:
C00053 00008	APPENDIX NEWMUS					PAGE 8-1
C00063 00009	CHANGES, ADDITIONS, ODDS AND ENDS		PAGE 9-1
C00067 00010	A BRIEF DISCUSSION OF VARIABLES			PAGE 10-1
C00077 ENDMK
C⊗;
ABSTRACT 				
LRNMUS is an information source for general music synthesis programs.
Familiarity with the Monitor Command Handbook, MUSIC.TVR[UP,DOC], and
SCORE.LCS[UP,DOC] is assumed exept for the STEP BY  STEP INSTRUCTIONS
FOR A  BASIC SOUND PROGRAM  which can  be waded through  by beginners
with  some help.   Knowledge of SAIL (or  ALGOL) is not  essential,but
strongly recomended. This file further assumes the user has access to
someone familiar with AI Lab  music programs who can fill in the gaps
which will undoubtedly exist between what  you want to know and  what
is supplied here.  This file attempts only to anticipate the broadest
questions of procedure. "Ours is not the reason why..."

Gareth Loy [1,DGL] is the proprieter of this file.  Comments and questions
are welcome.
2-1   INPUT FOR MUSIC PROGRAMS:			PAGE 4-1
Input is made  up of an  instrument definition, a  parameter list,and
other   information  the   compiler (NEWMUS) needs   which  we'll   call  the
initializing list. The Stanford music compiler reads this information
from one or  more files. Creating several files  for this information
is  suggested.  However,  all  the  statements  ,  declarations, etc.
described below can be  added from the console directly  into NEWMUS.
See page  3. The  advantage is flexibility  in seting things  up, the
disadvantage is that  you must then  retype the entire  event if  you
either leave  the  NEWMUS environment,  or want  to change  something
after it has been compiled. 

2-2    INITIALIZING LIST:
First, learn how to create files using the E editor. See page 11.

Create a file (maybe called INIT, or something).  Into it put the
following declarations:

SETCLOCK; (It takes some sequence of values for the sampling rate) ∀
	
ARRAY F2,F3,...,Fn(512);
F2,...Fn are functions (sine waves, envelope functions, etc.)
to be loaded with the instrument. (512) is the current size of a
memory block. F1 is always supplied with NEWMUS as a sine wave.
This can be overriden of course.
(Typical array statement: ARRAY F2,F3(512);)

VARIABLE <variable_name>,<v.n.>,<v.n.>;
        A number of variables
	are specified in NEWMUS automatically, such as the letters of the
	musical scale with their Hertz numbers (see APPENDIX NEWMUS).
	You can create variables for other purposes with the above format.

Other things can go into this file, for instance, you can tell
yourself the next file to read by writing:
PRINT "Next file name";
When the file is loaded into NEWMUS, the string in quotes will be printed.
Basicly you want to put everything in the initialization list
that you don't want to have to declare over and over again.


2-3    INSTRUMENT LIST
Create a file for your instrument definiton.
Now that you have arrayed the functions, specify their shape with either 
SYNTH or SEG, e.g.:

SYNTH(F2); 1 1 999 
(Note the location of the ;.)
This will create a sine wave in F2 with harmonic 1 (the fundamental) and
amplitude 1. 999 terminates the SYNTH list.  There is an extended mode:
SYNTH (F2); 99 1 1 90 1 999  
where 99 enters the mode, 
harmonic = 1, amp.=1, phase angle =90degrees, offset constant=1, 999term.

SEG(F3); 0 0 1 1 0 100 
(Note the semicolon.)
This allows  functions to  be drawn  in line  segments. The  function
described  has amplitude 0 at  location 0, amp.  1 @ loc.1,  0 @ 100.
Typing location # 100 terminates SEG.  SYNTH and SEG functions can be
created while runing NEWMUS, and will display the waveform. Just type
the above  statements up to the ";", then hit ⊂cr⊃. The waveform will
begin displaying and instructions on how to alter it will be printed.
You  can see  existing functions  graphicly in  NEWMUS by  typing SEE
(<function name>);.

Now  the instrument:
INSTRUMENT FUT;
OSCIL(P4,MAG/P2,F2);
OSCIL(U1,MAG*P3,F1);
OUTA←OUTA+U2;
END;
where: 

INSTRUMENT <name>;
begins the instrument list. This is a special kind
of DO list which the music compiler can read.  Like any DO
list,   it   must   be  terminated   by   END;   see   below.

OSCIL(<amplitude>,<frequency>,<function>);
This is a unit generator.
There are many kinds of unit generators:
see MUSIC.TVR[UP,DOC] for a complete list.

MAG
is  the magic number  specifying the  ratio of 512/sample  rate.
The  length of stored functions  in NEWMUS is 512  samples long.  The
ratio (512/sampling  rate) establishes  a base  frequency which  when
mulltiplied by  the desired frequency  number (in this  case,P3) will
sample  the  512  increment long  function  at  intervals  which will
produce the desired frequency. A further explanation  of this subject
can be found in MUSIC.TVR[UP,DOC]. This is also a good question for
a music programer. 

Pn represents a field  in an instrument call where  a number,variable
or address  can be stored to be fed  to the instrument being called. 
For instance, in the PLAY...FINISH statement, P1 is the  first number
(the number in the first field) after the name of the instrument FUT.
See  an  example  in  the  STEP  BY  STEP  INSTRUCTIONS,  and  below.
P2,P3,etc. follow after P1.   The fields are separated by  spaces (or
commas). 

Un is the output of a unit generater(numbered  in order  of  entry) 

OUTA  is  the output  block absorbing  this instrument.  There are three
more output blocks for the other three channels: OUTB, OUTC, OUTD.

END;(←note  semicolon;) this  ends the instrument list.

Comments can be added to this or any list by typing:

COMMENT say anything here until you write a semicolon , and you can 
write write as many lines as you like;
Alternate comment form:

< say anything here until a semicolon, but not exceeding one line;


2-4   INSTRUMENT WRITING CONSIDERATIONS:
Newmus is set up so  that P1 always determines the begin  time of the
instrument. For instance, if you want FUT to play at time 0, P1 would
be listed in your note list  as 0. Also, P2 is reserved to  represent
the total duration of the note  being played. So, P2 does two things:
it  tells the system  how long to  make the file  the instrument will
play into, and it also  is available to determine the length  of time
the  instrument will actually  play.   You CAN have  the instrument's
duration controled in another variable, but  P2 must still be in  the
note list  to represent the  length of the  file the  instrument will
read  into.   This information  is  given here  instead of  under the
parameter list heading below because  it affects how you define  your
instruments as well as how you write their note lists.


2-5    PARAMETER LIST
Here's where you tell the instrument what to play. 
Create a file for parameters.

PLAY;<instrument_name> P1 P2 P3 P4 ...Pn; FINISH
Typical PLAY statement for the instrument FUT described above:
PLAY FUT 0 1 440 1000;FINISH;
The parameter list must  end with FINISH;
The play statement is like a specialized block in SAIL with PLAY;
replacing BEGIN, and FINISH; for END;
Please see INSTRUMENT WRITING CONSIDERATIONS  above.
MUSIC COMPILER, WORD CONVERSION, AND D/A PROGRAMS:   PAGE 5-1
The NEWMUS compiler will  be used here.  The  documentation on Newmus
is  in MUSIC.TVR[UP,DOC].   


3-1 NEWMUS:
	NEWMUS is a compiler, and is the vehicle by which instruments
	are coupled with their parameters.  One or more files are
	created to contain the numeric representations of the waveform.
	Type:
R NEWMUS
	After some preliminary statements, it types:
"Input:"
       Type file  names of initialization,  instrument, &  note lists
       one at a time.   When it says "Input?" it expects a file name.
       To  do  anything  else,  like  to  make   declarations,  write
       functions, or to write instruments, etc.  type ⊂cr⊃ first.  To
       return to input mode, type ⊗⊂cr⊃.  If you get an error message
       "Storage full",  type  <CALL>, and  restart  using the  FREEZE
       method,  see below. Among  the variables  that are  given with
       NEWMUS are the Hz for pitches of the equal temperament  scale:
       A:440, AS(A SHARP):466.16,...GS.  See  APPENDIX NEWMUS.  Array
       F1 is  given as a simple  sine wave.  If you  want to watch it
       compile, see MONITE[1,MUZ] below:
"Output:"
	Name a file for storage of computed samples. There should be an
	integer(or letter) extention to the file name (e.g. TEST.1). 
	This is because,if your sound file will be longer than about two
        seconds, NEWMUS will
	automatically create more files with extensions n+1 to contain it.
	"MAX AMP" is part of data printed when compilation is complete 
	used to indicate the largest sample. Remember it.
	If you have no more input, then type:
<alt> EXIT

R DAC
	Runs the new 16 bit DAC and is very self explanatory.
	PLEASE HEED ITS DICTUM ABOUT NOT TYPING <CALL> SINCE YOU
	COULD HANG UP OTHER COMPUTER PROCESSES BY NOT DOING SO.
	IF YOU DO TYPE <CALL> ACCIDENTLY, IMMEDIATELY TYPE TO THE MONITOR::
C 0 <RETURN>
	WHICH WILL PROBABILY UNDO ANY DAMAGE YOU MAY HAVE DONE.
ANALOG ASPECTS					PAGE 6

4-1 Music room:
Switch  in back  of  silver  volume box  beside  Scully 280,  if  up,
moniters the  decks inside the cabinet, if  down, the Scully.  Scully
must be in record mode,  with volume up for channels outputing.   Set
Record level to about 5, Input to Line. Put Dolby in Rec mode. 

4-2 DAC:
There used to be switches on the old DAC to play with, but Andy's 
new one is more foolproof. It currently resides beside the Scully
in the music room. Its program is called "DAC" which is on the
system and is very self explanitory. It will run all flavors of 
input mode, 12,16 or 18 bit.

4-3 MONITOR SPEAKERS
If you  are not working  in the  music room, you  can switch the  TTY
audio channel to channel  1 of the D/A by typing <BREAK> 3U (See Audio
Switch Control, 2.9, Monitor Command  Manual). <BREAK>4U will select
channel B. If this switch has been changed, find out what the new
switch is in either IIIKEY[UP,DOC] OR DDKEY[UP,DOC].
BUT the D/A will  also
output to the music room,and if there are people using the D/A there,
they  will be  clobered by your  sounds. So,  send them  a message to
expect your  sounds, as it  is quite  unnerving to  be jolted out  of
meditation by another's static. See MAIL in Monitor Command.  Ttys 24
and 45 are  the ones  in the  musiic room.   Or  you might  move your
project to  the music room  to play your  sounds. Type:  AL ⊂prj,prg⊃
⊂cr⊃ to alias to a tty in the music room.  AL ⊂cr⊃ returns the tty to
its previous user. Or, DET(atch) your  job, move to an unused tty  in
the  music room  and  ATTACH  ⊂job #⊃  [prj,prg]  ⊂cr⊃.  You are  now
attached to the new tty. 
MISC. FILES AND PROGRAMS 			PAGE 7-1
**********
INFORMATION FILES:
MUSIC.TVR[UP,DOC]
SCORE.LCS[UP,DOC]
USEMUS.MAN[UP,DOC] FOR MUSIC 10
LRNMUS.DGL[UP,DOC]
**********

FUNC, a program for using lightpen to write functions, and/or
	to write functions into files. Lightpen works only from III's.
	Type 
R FUNC  
	After it enters, type ⊂cr⊃.  It will say
"SEG OR SYNTH?"
        Say either, usually SEG.
       When  the  graph  is displayed,  type  L  for  lightpen,  move
       lightpen  to location of  the circle  of dots, push  button on
       lightpen,  and draw.    To  fix  a  point,  hold  lightpen  at
       location, type ⊂cr⊃.  Follow directions until it says 
"ADD TO EXISTING FILE?"
	type N(o).  Then it will ask
"TYPE FILE NAME"
	write a filename without extension. Then it will say
"TYPE FUNCTION NAME"
	so write in a function name. 
	It will create the file with the extension .DAT.
	You can refrence this file from NEWMUS like any other file.
	Later, add functions to this file by saying Y(es) to 
"ADD TO EXISTING FILE?"
**********

FUNKY[MIX,MUZ] a file for manipulating arrays.
FUNKY.INF[MIX,MUZ] for information on FUNKY.
**********

WAVE[1,MUZ] a program to display samples of a sound created 
with NEWMUS.  It will not take files with extensions.  Copy the file
into a file without one, then RU WAVE[1,MUZ] and do what it says.
**********

MONITE[1,MUZ]  a file  containing  the  instrument MONITER,  used  to
display  word blocks  in NEWMUS  while they are  being computed.   It
isn't an instrument you will hear, but a kind of  visual loudspeaker.
So it's function is to display another  instrument .  So load it with
your  instrument,  and  write  a  parameter  list  for MONITER  where
P1=starting time,  P2=duration, P3 is  the amplitude,  and P4 is  how
often to display. Typical values might be 0 1 1000 2;
There might be some better documentation somewhere, but I don't know where.
**********

S  This is a program, not a file, containing a display program for viewing
sound files in 12 bit and other formats.  It also contains  filters
(lowpass, hignpass). It has some internal documentation.  Type:
R S It will type:
"*"
	For information type either "?" or HELP, or see JAM. Good luck!
**********

RU CREV[MIX,MUZ] a file for creating reverb instruments. For info. type 
HELP. You want to treat the file like an automatic equation solver.  The
equation takes two supplied values  and finds the third. The variables are
Reverb_time,Gain,& Delay_time. To solve for Gain as the unknown type G,
then enter values for the other two independent variables. 
When the solution is reached, CREV will write those values into a unit
generator and put it in a file for you.  See Loren Rush for details (MUZ).
Suggested  delay factor between unit generators: .8, gain factor .94.)
Writing good reverb instruments is an intuitive gift.
**********

EGEN [1,DGL], a file of envelope generators to be used in NEWMUS.
EGEN.INF[1,DGL], for information on EGEN.
**********

PPSAV  This is a program, not a file, which will create a file and put into
it the contents of your screen.  The file will be called PPSAV.TMP.
**********

NOTICE: Programs and files sometimes change location.  If you are looking
for a file listed here or anywhere, and the computer doesn't find it,
try the following, type to the monitor:
DIR <filename>.<ext>[*,PRG]|[PRJ,*]
The first option will search for the file through all the programer's 
projects, the second option will search through all progects, matching
them against the filename. For example:
DIR FUNKY.INF[*,MUZ] will search MUZ for a project that has FUNKY.INF.
**********

R DRAW  -A progrram for drawing with the lightpen, or console, works only
from III consoles. Type HELP for help. To print the drawing on the XGP type:
R XIP;@<filename_created_in_DRAW><cr>
**********

To select different fonts printed on the XGP, find a font list (ask a
hacker), find one you like, then type to the monitor:
XS/NOT<file_name>/font=<font_filename>.<ext><cr>
**********

MUSIC 5 programs are located in [M5,JAM] as files PASS1.F4,PASS2.F4,PASS3.F4.
**********
DEMO.DMP[1,MUZ] Has space program in it that works.
Get in tty mode and type
SPACE;
**********
MIXER:
	Loren Rush's mixer programs are on [MIX,MUZ].
All these programs are in dump files.

CONV	SAI	        Add headers, and look at sound files.
AIDS  	FAI   	MIXER 	Add in direct signal.
APR   	FAI   	MIXER 	All-pass reverberator.
WHEAD 	FAI   	MIXER 	Write a header.
ADDF  	SAI   	MIXER 	Combine two files.
CONV  	SAI   	MIXER 	Convert formats and/or normalize.
CREV  	SAI   	MIXER 	Create a reverberator.
DPYF  	SAI   	MIXER 	Display a function.
FNEW  	SAI   	MIXER 	Temporary version of FUNK.
FUNK  	SAI   	MIXER 	Create amplitude shaping functions.
GETIF 	SAI   	MIXER 	Get input_file.
GETOF 	SAI   	MIXER 	Get output_file.
ID    	SAI   	MIXER 	Create identifier lists.
INCHRA	SAI   	MIXER 	JMG's input_string scanner.
MAIL  	SAI   	MIXER 	Mail info from mixer.
MIXER 	SAI   	MIXER 	Mix_master.
PLOT  	SAI   	MIXER 	Display plotter.
QUAD  	SAI   	MIXER 	Create space functions.
QUADF 	SAI   	MIXER 	Change from mono to quad using quad functions.
RETF  	SAI   	MIXER 	Retrograde a file.
REVF  	SAI   	MIXER 	Reverberate a file.
RHEAD 	SAI   	MIXER 	Read a header.
SHAPE 	SAI   	MIXER 	Shape a file using funk functions.
APPENDIX NEWMUS					PAGE 8-1

If you  get the  error message  STORAGE FULL,  notice how large  your
current core image is, then type <call>, then increase this number by
two (or so) and type: R NEWMUS <the_number> (this specifies a minimum
core size of that number). 
**********


**********
There are now  several small NEWMUS  dump files around  which because
they  run  in  smaller  core  are  more  efficient. To  wit:  
LOAD/DU@NODDT[SYS,MUS] 
LOAD/DU @SMLMUS[SYS,MUS] 
These commands will load a dump file of  these compilers in your area
NODDT  is not  loaded with  DDT, SMLMUS is  also missing  the display
features. 
**********

FREEZE METHOD:
You can add anything  to NEWMUS you want, and then  save the enlarged
version to make  it the initial form so you don't have to continually
reload the additional  data.   First add the  information to  NEWMUS,
then type:
<ALT>FREEZE 
"FROZEN!"
when frozen, exit to moniter and write
SAV <filename, anything besides NEWMUS>
Your program will be saved in the required core.  You now have a dump
file with that  filename which contains, besides NEWMUS, all the data
you have put into it.  Address it as follows:
RU <dump_file_name>
**********

EDITING FROM NEWMUS:
Given an error in an input list, you have the option to edit the
error in the file without leaving the NEWMUS environment.  Type E, the 
program then moves to the location of the error.  Correct it, then type
⊗X,then GO to return to your location in NEWMUS.
**********
SOME VALID SETSPEED VALUES:
# OF CHANELS	CLOCK RATE	SPEED
1		12800		

**********

Pitches given in NEWMUS:
A 	440
AS	466.16
B	493.89
C	261.62
CS	277.18
D	293.66
DS	311.13
E	329.63
F	349.23
S	369.99
G	391.99
GS	415.31
**********

If computation  is interrupetd in  NEWMUS for any  reason (such  as a
parity error,  if you type CALL accidently,  etc.) restart by typing:
RU <NEWMUS_output_file_name>.SAV <cr>.  That will  start it again  at
the point it was terminated.   If you wish to simply stop and restart
the  same  core image  at  the input  level, type  <call>,  then type
S(tart). 
**********

If you wish to see a listing of parameters introduced to NEWMUS, type
<alt>LIST<cr>	this lists all variables and arrays declared.
<alt>VARIABLE          "    "      "                    "   .
<alt>ARRAY	       "    "                  "        "   .
**********

There  is a  unit  generator in  NEWMUS  which routinizes  frequencey
modulation called INTRP.  It's parameters are:
NTRP(MAG*<minimum_modulation_index>,MAG*<max._mod._index>,<function>);
These two instruments are equivilent:
INSTRUMENT FUT;
OSCIL(P4,MAG/P2,F2);
NTRP(P5*P6*MAG,P5*P7*MAG,F3);
OSCIL(U2,P5*MAG,F1);
OSCIL(U1,MAG*P3+U3,F1);
OUTA←OUTA+U4;
END;
INSTRUMENT FUT;
OSCIL (P4,MAG/P2,F2);
OSCIL((P7-P6)*P5,MAG/P2,F3);
OSCIL((P6*P5)+U2,MAG*P5,F1);
OSCIL(U1,MAG*P3+U3,F1);
OUTA←OUTA+U4;
END;
**********

It is now possible to play sounds through the d/a as soon as they are
compiled in NEWMUS.  To do so, add the code "DA:n.n" where n is the length
of the sound file to be played in seconds (don't write integer values,the
dot is aparently necessary). This statement is placed in the PLAY statement
thus:
PLAY DA:1.0; FOO 0 1 A 1000;FINISH;  
Once the sound has played once in NEWMUS, it can be played again immediately
by typing from TTY mode:
<alt>P<cr><alt> 
and the sound will play when you type the second <alt>.
**********

You can have NEWMUS  create a 12 bit sound file  directly which saves
you from having  to run NMUSIO by typing the following when asked for
an output file name:           
"Output:"<file_name>.<ext>/SOUND/BYTESIZE=12<cr>
**********
It is possible to specify the output file from the play command type:
PLAY<space><file_name>.<ext>;<instrument_call>;FINISH;
You can also combine the 12 bit word length specification, type;
PLAY<space><file_name>.<ext>/SOUND/BYTESIZE=12;<instrument_call>;FINISH;
**********

If you are doing a long compute in NEWMUS, and you want to stop it, or it
stops itself for some reason (error, etc.) it can be restarted by the following:
RU<output_file_name>.SAV and it will start up where it left off.
Furthermore, the job that is doing the compute can be detatched from your
terminal but still continue running by doing the following:
	Start the compute
	type C↑
	type CF
**********

Within an instrument it is possible to write a statement that will be
executed only at the time the instrument is being used to generate its
waveform.  The format is:
INSTRUMENT <name>;
    I_ONLY
	<statements>
    END;
<continuation_of_instrument_list>;
END;
**********

It is possible to redefine functions from a PLAY statement.  But the
redeffinition must come AFTER! the next call to that instrument, e.g.:
PLAY; FUT 0 1 A 1000; 
FUT 1 1 C 1000; 
SEG(F2); 0 0 1 100 
FINISH;
This has the effect of redefining F2 for the second call to FUT.
The compiler calculates everything according to the latest begin time
(P1), hence, for the redeffinition to affect the next note, it must come
after the new begin time.
**********
CHANGES, ADDITIONS, ODDS AND ENDS		PAGE 9-1
USEFUL TIDBITS:
-MAG/Pn(usually pn←p2) is note duration. MAG*Pn is fqy.
-Maximum amplitude processed by the d/a 
	in 18 bits  ~ 370000
	in 12 bits  = 2047.
-PRINT ⊂string⊃; will print the values, assuming they exist.
-SEE (array); will display it.
-PUT (FUNCTIONn ⊂from 0→512⊃)⊂number⊃; to change an increment in a function.
<alt>VARIABLE writen in NEWMUS will list all available variables.
<alt>FUNCTION    "    "    "     "    "    "     "     functions.
<alt>LIST will list everything indiscriminantly.
-C<space>0 will release the XGP,DA, other device attached by MPLA, etc.
-WHO<space>R | M : R=system run time display; M=your own programs.
-TO PASS NEGATIVE VALUES IN A PLAY STATEMENT, IT IS NECESSARY TO 
PRECEED THEM WITH A COMMA,otherwise the compiler wouldn't know if
it were a new peram. or an algebraic variable.
-default width of a line=69 char.
-default length of a single page = 54 char.
A BRIEF DISCUSSION OF VARIABLES			PAGE 10-1
There are two kinds of variables, regular variables, and "run-time" 
variables. 

-Just plain variables are the ones you have been dealing with so far. 
They are defined:
VARIABLE X,Y,Z;
and their values are assigned anytime after that:
x←0;
When a variable of this type is used in an instrument deffinition, it
maintains its assigned value from start to finish.

-"Run-time" variables are defined:
VARIABLE /X,/Y,/Z;
and  their  values  likewise assigned  anytime  after  that.    Their
particular  distinction is that when  they are used  in an instrument
deffinition  their  value   can  be   changed  from  one   "pushdown"
(computation of one sample of sound)  to another.  Here is an example
of a "run_time" variable:
VARIABLE /X;
X←0;
INSTRUMENT FOO;
X←X+1;
END;
If this instrument were given the following  instrument call with the
sampling rate  = 20,000, then X would equal 20,000  at the end of the
computaton: 
PLAY; FOO 0 1; FINISH;
The run_time variable will continue to increase on subsequent playing
of this instrument unless it is reassigned.  It would be 
reassigned  if either there were an assignment statement after the
PLAY statement that said so, thus:
PLAY; FOO 0 1;
X←0;
FINISH;
or if you reloaded the instrument into  the compiler (NEWMUS). In the
latter  case, you  would be  starting from  scratch and  the compiler
would see  the original assignment  statement for  that variable.  In
either  case, the  variable  would  still increment  by  1 for  every
pushdown of the instrument. 

However, there  is  another place  to reassign  the  variable, and  a
reason for  doing so. In the following  instruments, the value of the
run_time variable is passed from  the first instrument to the  second
instrument.   The  purpose of  the variable  is to  pass the  current
output sample to the next instrument. If it is to be current, it must
not be cumulative.   So, at  the end of  the second instrument it  is
reset to 0. 
VARIABLE /X,/Y;
Y←X←0;
INSTRUMENT FOO;
OSCIL(P4,MAG*P3,F1);
OUTA←X←OUTA+U1;
END;
INSTRUMENT FUT;
Y←X;
X←0;
END;